package ecs

import (
	"myproject/pkg/aliyun"
)

type Client struct {
	*aliyun.BaseClient
}

func NewClient(base *aliyun.BaseClient) *Client {
	return &Client{
		BaseClient: base,
	}
}

// func (c *Client) DescribeInstances() ([]ecs.Instance, error) {
// 	// 创建 ECS 客户端
// 	client, err := ecs.NewClientWithAccessKey(c.BaseClient.RegionId, c.BaseClient.AccessKeyId, c.BaseClient.AccessKeySecret)
// 	if err != nil {
// 		return nil, fmt.Errorf("failed to create ECS client: %v", err)
// 	}

// 	// 调用 DescribeInstances API
// 	request := ecs.CreateDescribeInstancesRequest()
// 	request.Scheme = "https"

// 	response, err := client.DescribeInstances(request)
// 	if err != nil {
// 		return nil, fmt.Errorf("failed to describe instances: %v", err)
// 	}

// 	return response.Instances.Instance, nil
// }
